package com.cike.productmanager.adt;

public class taskUnit {
 
	protected int ID;										//任务ID，同服务器数据库，可以是活动或者合同的，根据taskType选择
	protected int taskType;							//任务类型，1.合同 2.活动，或者改成enum
	protected int startTime;							//开始时间
	protected int endTime;							//结束时间
	 
	protected int importance;						//任务重要程度
	
	

	protected int displayID;							//陈列指引ID，同服务器数据库
	 			
	protected int storeBelongID;				//归属门店ID，同服务器数据库
	protected String storeBelong;				//归属门店名称
	 
	protected taskFeedback feedback;		//任务反馈ID，可以使活动也可以是合同的，同服务器数据库

	
	
	
	public int getImportance() {
		return importance;
	}

	public void setImportance(int importance) {
		this.importance = importance;
	}
	
	
		public taskUnit(int iD, int taskType, int startTime, int endTime,
			int importance, int displayID, int storeBelongID,
			String storeBelong, taskFeedback feedback) {
		super();
		ID = iD;
		this.taskType = taskType;
		this.startTime = startTime;
		this.endTime = endTime;
		this.importance = importance;
		this.displayID = displayID;
		this.storeBelongID = storeBelongID;
		this.storeBelong = storeBelong;
		this.feedback = feedback;
	}
		
		
		
		
		
		
		//下面三个都是为了生成所需String时间形式的方法
		public String getTimeLimit() {
			
			String start = String.valueOf(startTime);
			String end = String.valueOf(endTime);
			
			String timeLimit = start.substring(0, 4)+"-"+start.substring(4, 6)+"-"+start.substring(6)+" "
													+end.substring(0, 4)+"-"+end.substring(4, 6)+"-"+end.substring(6);
			
			
			return timeLimit;
		}
		public String getStringStartTime() {
			String start = String.valueOf(startTime);
			String startform = start.substring(0, 4)+"-"+start.substring(4, 6)+"-"+start.substring(6);
			return startform;
		}
		public String getStringEndTime() {
			String end = String.valueOf(endTime);
			String endform = end.substring(0, 4)+"-"+end.substring(4, 6)+"-"+end.substring(6);
			return endform;
		}
	
	
	

	public int getStoreBelongID() {
		return storeBelongID;
	}

	public void setStoreBelongID(int storeBelongID) {
		this.storeBelongID = storeBelongID;
	}

	public int getID() {
		return ID;
	}

	public void setID(int iD) {
		ID = iD;
	}

	public int getTaskType() {
		return taskType;
	}

	public void setTaskType(int taskType) {
		this.taskType = taskType;
	}

	public int getStartTime() {
		return startTime;
	}

	public void setStartTime(int startTime) {
		this.startTime = startTime;
	}

	public int getEndTime() {
		return endTime;
	}

	public void setEndTime(int endTime) {
		this.endTime = endTime;
	}

	public int getDisplayID() {
		return displayID;
	}

	public void setDisplayID(int displayID) {
		this.displayID = displayID;
	}

	public String getStoreBelong() {
		return storeBelong;
	}

	public void setStoreBelong(String storeBelong) {
		this.storeBelong = storeBelong;
	}

	public taskFeedback getFeedback() {
		return feedback;
	}

	public void setFeedback(taskFeedback feedback) {
		this.feedback = feedback;
	}
	
	
	 
}
 
